﻿@model MyPSDALayer.Tech
@using (Html.BeginForm("Create", "ManageTech", FormMethod.Post, new { enctype = "multipart/form-data", id = "fileImgUrl" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>教程</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.TechName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TechName)
            @Html.ValidationMessageFor(model => model.TechName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.TypeName)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TypeName, ViewBag.TypeList as SelectList)
            @Html.ValidationMessageFor(model => model.TypeName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CoverUrl)
        </div>
        <div class="editor-field">
            @Html.FileUploadFor(o => o.CoverUrl)
            @Html.ValidationMessageFor(model => model.CoverUrl)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Descr)
        </div>
        <div class="editor-field">
            @Html.UEditorFor(o => o.Descr)
            @Html.ValidationMessageFor(model => model.Descr)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
